package com.tbb.app.common.exception;

import lombok.Data;

/**
 * 参数异常
 *
 * @author LiuSenLin
 * @date 2020/2/29
 */
@Data
public class ParamValidException extends RuntimeException {
    private BaseErrorCode errorCode;

    private String message;

    private Object data;

    public ParamValidException(BaseErrorCode errorCode) {
        this.errorCode = errorCode;
        this.message = errorCode.getMessage();
    }

    public ParamValidException(String message) {
        this.message = message;
        this.errorCode = CommonCode.C00003;
    }
}
